package com.op.crm.persist.dao;

import java.util.List;

import com.op.crm.persist.model.Action;
import com.op.crm.persist.model.Group;
import com.op.crm.persist.model.Role;
import com.op.crm.persist.model.User;

public interface SecurityDao {
	public void saveUser(User user) throws Exception;
	public void saveAction(Action action) throws Exception;
	public void saveRole(Role role) throws Exception;
	public void saveGroup(Group group) throws Exception;
	
	public void updateAction(Action action) throws Exception;
	public void updateRole(Role role) throws Exception;
	public void updateGroup(Group group) throws Exception;
	
	public User getUser(String username) throws Exception;
	public Action getAction(String actionId) throws Exception;
	public Role getRole(String roleId) throws Exception;
	public Group getGroup(String groupId) throws Exception;
	
	public List<Action> selectActions() throws Exception;
	public List<Role> selectRoles() throws Exception;
	
	public List<Action> selectActionByIds(List<String> idList) throws Exception;
	public List<Role> selectRoleByIds(List<String> idList) throws Exception;
	public List<Group> selectGroupByIds(List<String> idList) throws Exception;
	public List<User> selectUserByIds(List<String> idList) throws Exception;
	public List<Action> selectActionNotIn(List<Action> actions) throws Exception;
	
	public void deleteAction(Action action) throws Exception;
}
